import Vue from '../../../vue-scoure-code/vue-dev/dist/vue'

import VueRouter from '../../../vue-router-dev/dist/vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Layout',
    component: () => import('@/views/layout/Layout'),
    redirect:'Home',
    children:[{
      path: '/home',
      name: 'Home',
      component: () => import('@/views/home/Home'),
    },
    {
      path: '/workbench',
      name: 'Workbench',
      component: () => import('@/views/workbench/Workbench'),
    }]
  },
]

const router = new VueRouter({
  routes,
  scrollBehavior(to, from, savedPosition){
    console.log('scrollBehavior',to,from,savedPosition)
    return { x: 0, y: 0 }
  }
})

export default router
